home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Utilities / Winter Shell 1.0d2 / Source / Libraries / VBLTaskLib / VBLTaskLib.c next >
Encoding:
C/C++ Source or Header  |  1993-12-31  |  618 b   |  39 lines  |  [TEXT/KAHL]

  1. /* VBL tasks.
  2.     93/12/31 aih split out of ApplicationLib.c */
  3.     
  4. #ifndef NDEBUG
  5.  
  6. #include <Retrace.h>
  7. #include "VBLTaskLib.h"
  8.  
  9. /* VBL tasks used while debugging */
  10.  
  11. /* write an odd value to memory location 0 (the same value used by TMON
  12.     Professional's Nasty0 command) */
  13. static pascal void VBLNasty0(void)
  14. {
  15.     asm {
  16.         move.l #0x50FFC003, 0
  17.         move.w #1, VBLTask.vblCount(a0)
  18.     }
  19. }
  20.  
  21. /* install VBL tasks */
  22. void VBLInit(void)
  23. {
  24.     static VBLTask task;
  25.     
  26.     task.qType = vType;
  27.     task.vblAddr = VBLNasty0;
  28.     task.vblCount = 1;
  29.     (void) VInstall((QElemPtr) &task);
  30. }
  31.  
  32. #else /* NDEBUG */
  33.  
  34. void VBLInit(void)
  35. {
  36. }
  37.  
  38. #endif /* NDEBUG */
  39.